A microcontroller is a circuit comprising essentially, on one and the same integrated circuit, a microprocessor also called a central processing unit, and a program memory. This program memory is specific to each microprocessor. It contains a set of instructions that must be adapted to a specified program, that is, an application that the microcontroller must execute. These sets of instructions may be efficient in varying degrees. Consequently, the programs are also important in varying degrees depending on the application for which they are designed.
Furthermore, these applications are numerous and varied. They are found in compatible type microcomputers, for example, for the control of hard disks. They may also be found in applications related to the control of any device, such as, for example, for flasher lights in the field of automobiles.
During the phase for the setting of the control program, the microcontroller is linked to a host circuit. This connection falls within the framework of the monitoring of the functioning of the microcontroller. In this context, it should be possible to read the electrical states of the microcontroller at certain steps and especially those steps where an operating defect is noted. It should also be possible to set the operation of the microcontroller and, in this case, the host circuit will write states in certain registers of the microcontroller.
These read and write operations between the registers of the microcontroller and the host circuit are achieved by means of an interface. More generally, this interface is used to exchange information elements with the outside world. These information elements are essentially data elements to be received and commands to be sent corresponding to the future use of the microcontroller.
To this end, the interface comprises a control bus and, more generally, two data and address exchange registers. Indeed, the number of exchange registers is generally small because, for reasons of cost, it is accepted that the structure of exchange with the external world will be reduced to the strict minimum. This makes the use of the microcontroller more tedious, especially during the stage for the setting of the control program.
The places in the memory of the microcontroller where it is necessary to read or write are varied. The term "memory" of the microcontroller may designate the memory proper, but may also designate operating registers of the microcontroller. Thus, this memory may be a program memory, namely the place in which the instructions to be executed in the microprocessor are stored. It may also be a data memory in which there are stored measured data elements of the controlled parameters of the microcontroller.
Finally, this memory may represent a set of parameter-setting registers or registers for the operation of the microcontroller, in particular, a batch of registers for setting the parameters of its peripherals. These registers are called special function registers (SFR). They are peripheral control registers that are indispensable for setting the parameters of these peripherals. The interface itself, owing to the different protocols that it is liable to accept, must have its parameters set by states stored in these registers. Other peripherals, like internal counters or clock frequency registers, are controlled by such registers.
In the context of emulation, a number of registers are used to program the different parts of a peripheral dedicated to emulation, known as an "on-chip emulator". This peripheral will hereinafter be called an OCE. To control the working of the microcontroller, a host circuit external to the microcontroller must be capable of accessing these registers, thereby enabling the programming of the different parts of the OCE. The central processing unit of the microcontroller, for its part, must also be capable of accessing these registers. It is therefore necessary that these registers should have an address in the memory space of the microprocessor.
The addressing space of the microcontroller is represented by the length of an address word that can be conveyed on the address bus of the microcontroller. This addressing space, according to its definition, is limited. However, in the framework of emulation, the number of operations to be controlled is becoming ever greater. These controls are obtained by means of registers. In these registers, certain electrical states of the microcontroller are copied, or their contents are compared with other electrical states of the microcontroller. Consequently, the number of monitoring registers needed, especially during emulation, becomes great. Some of these registers, and even many of them, therefore, cannot be addressed directly. Indeed, it is not possible to associate, with each of them, an address corresponding to an SFR, namely a peripheral control register, that would enable these supplementary registers to be accessed directly.